import { INCREMENT,DECREMENT } from "../constens/countConst"
import store from "../store"
//累加
export const incrementAction=(data=1)=>{
    return {
        type:INCREMENT,
        data
    }
}
//累减
export const decrementAction=(data=1)=>{
    return {
        type:DECREMENT,
        data
    }
}
//异步累加
export const waitIncrementAction=(data=1)=>{
    return ()=>{
        setTimeout(()=>{
            store.dispatch({
                type:INCREMENT,
                data
            })
        },2000)
    }
}